/**
 * 
 */
package com.thor.palmmall.rest.chart.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.chart.ARentalParam;
import com.thor.palmmall.spi.chart.SRentalParam;

/**
 * @author NuoSa
 *
 * @since 1.0
 */
public class SRentalParamConverter implements Converter<ARentalParam, SRentalParam> {

  public static SRentalParamConverter getInstance() {
    if (instance == null)
      instance = new SRentalParamConverter();
    return instance;
  }

  private static SRentalParamConverter instance;

  private SRentalParamConverter() {
  }

  @Override
  public SRentalParam convert(ARentalParam source) {
    if (source == null) {
      return null;
    }
    SRentalParam target = new SRentalParam();
    target.setDate(source.getDate());
    target.setStore(source.getStore());
    return target;
  }

}
